(define-module (common)
  #:re-export (getpid getppid)
  #:export ((strerror . error->string)
	    +minus-one-ll+
            +minus-one+
            largest-representable-number
            num-bits
            err
            unrecognized-error-code
            fs-type
            translate-foreign-list
            with-gensyms
            select-error
            flag-is?
            enable-flags
            disable-flags
            only-flags
            free-memory-list
            mode-t
            mode
            stat
            make-stat
            stat-t
            st-type
            st-fstype
            st-fsid
            st-ino
            st-gen
            st-rdev
            st-mode
            st-nlink
            st-uid
            st-gid
            st-size
            st-atime
            st-mtime
            st-ctime
            st-blksize
            st-blocks
            st-author
            st-flags
            set-trans
            set-type
            set-vtx
            stat-get
            open-flags
            with-cleanup
            has-perms?
            set-perms!
            set-perms-if!
            clear-perms!
            copy-perms
            is-dir?
            is-reg?
            is-lnk?
            is-chr?
            is-blk?
            is-sock?
            is-fifo?
            is-useunk?
            is-vtx?
            has-passive-trans?
            has-active-trans?
            is-fs-root?
            is-mmap?
            is-nocache?
            is-useunk?
            set-uid!
            set-gid!
            set-mmap!
            set-nocache!
            set-useunk!
            set-active-trans!
            set-passive-trans!
            set-root!
            set-types!
            memcpy
            stat-copy
            open-modes
            set-spare!
            set-owner!
            set-group!
            set-others!
            set-unknown!
            gid-t
            +gid-t-size+
            uid-t
            +uid-t-size+
            valid-id?
            split-path
            join-path
            pathconf-type
            dirent-type
            dirent-name
            dirent-size
            off-t
            loff-t
            ino-t
            pid-t
            get-type
            statfs-t
            make-statfs
            statfs-get
            statfs-copy
            statfs-struct
            statfs
            f-type
            f-bsize
            f-bfree
            f-bavail
            f-files
            f-ffree
            f-namelen
            f-favail
            f-frsize
            f-flags
            seek-type
            select-type
            foreign-string-zero-separated-to-list
            is-uid?
            is-gid?
            device
            device-major
            device-minor
            <device-id>
            with-stream
            concatenate-string
            exit
            list-to-foreign-string-zero-separated
            string-list-len
            sum-list
            lock-flags
            make-mode
            make-mode-clone
            time-value-t
            time-value
            make-time-value
            +now-time-value+
            make-dirent
            write-dirent
            read-dirent
            time-value-equal?
            time-value-newer?
            time-value-seconds
            time-value-microseconds
            remove-declare
	    stat-eq
	    load-hurd-common-libraries)
  #:re-export (getpid getppid
		      getuid getgid
		      geteuid getegid)
  #:use-module (oop goops)
  #:use-module (rnrs arithmetic fixnums)
  #:use-module (rnrs base)
  #:use-module (srfi srfi-1)
  #:use-module (hurd-cl-compat))

(read-set! keywords 'prefix)

(define-syntax-rule (include-from-paths x ...)
  (begin (include-from-path x)
	 ...))

(include-from-paths
 "common/constants.lisp"
 "common/device-id.lisp"
 "common/dirent.lisp"
 "common/error.lisp"
 "common/fs-type.lisp"
 "common/ids.lisp"
 "common/lock.lisp"
 "common/maptime.lisp"
 "common/memcmp.lisp"
 "common/memcpy.lisp"
 "common/mode.lisp"
 "common/open-flags.lisp"
 "common/pathconf.lisp"
 "common/seek.lisp"
 "common/select.lisp"
 "common/statfs.lisp"
 "common/stat.lisp"
 "common/time-value.lisp"
 "common/types.lisp"
 "common/utils.lisp")
